package whisper1;

public class PC {
    private CPU cpu;
    private HardDisk hd;

    public void setCPU(CPU cpu) {
        this.cpu = cpu;
    }

    public void setHardDisk(HardDisk hd) {
        this.hd = hd;
    }

    public void show() {
        System.out.println("CPU速度：" + cpu.getSpeed());
        System.out.println("硬盘容量：" + hd.getAmount());
    }
}
